home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 #2 / Ham Radio 2000 - Volume 2.iso / HAMV2 / TCP_IP / TNOS230S / FILES.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-09-14  |  7.6 KB  |  229 lines

  1. #ifndef    _FILES_H
  2. #define    _FILES_H
  3.  
  4. #define    FTP_READ    1    /* Read files */
  5. #define    FTP_CREATE    2    /* Create new files */
  6. #define    FTP_WRITE    4    /* Overwrite or delete existing files */
  7. #ifndef _MAILBOX_H
  8. #define    AX25_CMD    8    /* AX.25 gateway operation allowed */
  9. #define    TELNET_CMD    16    /* Telnet gateway operation allowed */
  10. #define    NETROM_CMD    32    /* NET/ROM gateway operation allowed */
  11. #define    SYSOP_CMD    64    /* Remote sysop access allowed */
  12. #define    EXCLUDED_CMD    128    /* This user is banned from the BBS */
  13. #endif
  14. #define    PPP_ACCESS_PRIV    0x0100    /* Priv bit for PPP connection */
  15. #define    PPP_PWD_LOOKUP    0x0200    /* Priv bit for peerID/pass lookup */
  16. #define FILE_PATH_SIZE 256
  17.  
  18.  
  19. /* External definitions for configuration-dependent file names set in
  20.  * files.c
  21.  */
  22. extern const char *Alias;        /* the alias file */
  23. extern const char *ANSIArea;        /* ANSI areas file */
  24. extern const char *ANSILogin;        /* ANSI login file */
  25. extern const char *AreaData;        /* Descriptions of message areas */
  26. extern const char *AreaSlist;        /* List of message areas for sysops */
  27. extern const char *CommandHelp;        /* Command Session Help file */
  28. extern const char *ConfNews;        /* conference bridge news file */
  29. extern const char *DomainFile;        /* Domain cache */
  30. extern const char *EditorHelp;        /* Mini-Editor Help file */
  31. extern const char *ETCdir;        /* the ETC directory */
  32. extern const char *Fdbase;        /* Finger database file */
  33. extern const char *FingerDir;        /* Finger info directory */
  34. extern const char *FTPHelp;        /* FTP Help file */
  35. extern const char *Ftpmotd;        /* FTP message of the day */
  36. extern const char *Group;        /* the group file */
  37. extern const char *Hostfile;        /* Remote FTP user and password */
  38. extern const char *LOGdir;        /* log directory */
  39. extern const char *Maillog;        /* mail log */
  40. extern const char *Mailqdir;        /* Outgoing mail spool */
  41. extern const char *Mailqueue;        /* Outgoing mail work files */
  42. extern const char *Mailspool;        /* Incoming mail */
  43. extern const char *MANdir;        /* Manual pages base directory */
  44. extern const char *PBBSHelp;        /* PBBS Help file */
  45. extern const char *MOTDfile;        /* PBBS MOTD file */
  46. extern const char *MOTDsysfile;        /* PBBS MOTD file for SYSOPs */
  47. extern const char *NEWUSERfile;        /* New PBBS User file */
  48. extern const char *Onexit;        /* Cmds executed on exit */
  49. extern const char *PublicDir;        /* public directory */
  50. extern const char *Quotes;        /* List of quotes of the day */
  51. extern const char *Rewritefile;        /* Address rewrite file */
  52. extern const char *Routeqdir;        /* queue for router */
  53. extern const char *SMILEYFile;        /* conf smiley file */
  54. extern const char *Spool;        /* Spool directory */
  55. extern const char *Startup;        /* Initialization file */
  56. extern const char *Userfile;        /* Authorized FTP users and passwords */
  57. extern const char *VersionFile;        /* Command Session version file */
  58.  
  59. #ifdef ASKHOME
  60. extern const char *AskhomeFile;        /* Askhome prompt */
  61. #endif
  62.  
  63. #ifdef BBSEXPORT
  64. extern const char *EXPORTDir;        /* Export directory */
  65. #endif
  66.  
  67. #ifdef BBSIMPORT
  68. extern const char *IMPORTDir;        /* Import directory */
  69. #endif
  70.  
  71. #ifdef BROWSER
  72. extern const char *Cookiejar;        /* cookies received by local browser */
  73. extern const char *IncomingURLs;    /* directory for files received by local browser */
  74. extern const char *CheckedURLs;        /* files with checked URL data */
  75. #endif
  76.  
  77. #ifdef CATALOG
  78. extern const char *CATALOGfile;        /* String Catalog file */
  79. #endif
  80.  
  81. #ifdef CONVERS
  82. extern const char *ConfHlp;        /* Conference Help File */
  83. extern const char *ConfInfo;        /* Conference user info */
  84. extern const char *NetControlHlp;    /* Help file for Net Control functions */
  85. #endif
  86.  
  87. #ifdef CRONTAB
  88. extern const char *CRONTABFile;        /* Crontab file */
  89. #endif
  90.  
  91. #ifdef DELEGATE
  92. extern const char *DelegateFile;    /* delegation data file */
  93. #endif
  94.  
  95. #ifdef ENCAP
  96. extern const char *EncapRoutes;        /* Dynamic encap routes */
  97. #endif
  98.  
  99. #ifdef EXPIRY
  100. extern const char *Expirefile;        /* Message expiration control file */
  101. #endif
  102.  
  103. #ifdef FIFOSERVER
  104. extern const char *FIFO_IN;        /* FIFO input */
  105. extern const char *FIFO_OUT;        /* FIFO output */
  106. #endif
  107.  
  108. #ifdef GPS
  109. extern const char *GPSfile;        /* All heard GPS position data */
  110. #endif
  111.  
  112. #ifdef HOLDMODS
  113. extern const char *UserHoldFile;    /* file w/user name to hold mail from */
  114. extern const char *WordHoldFile;    /* file w/words to hold mail if found in */
  115. #endif
  116.  
  117. #ifdef HTTP
  118. extern const char *Cookiefile;        /* last cookie number assigned */
  119. extern const char *Cookiedata;        /* cookies assigned */
  120. extern const char *HTTPdir;        /* http root directory */
  121. extern const char *HTTPheadfile;    /* http directory 'head' file */
  122. extern const char *HTTPinclude;        /* http directory 'include' file */
  123. extern const char *HTTPtailfile;    /* http directory 'tail' file */
  124. #endif
  125.  
  126. #if defined(MAILBOX) || defined(DELEGATE) || defined(REQSVR) || defined(MAILFILTER)
  127. extern const char *Helpdir;        /* Mailbox help file directory */
  128. #endif
  129.  
  130. #ifdef MAILBOX
  131. extern const char *Historyfile;        /* Message ID history file */
  132. extern const char *Signature;        /* Mail signature file directory */
  133. #endif
  134.  
  135. #ifdef MAILCMDS
  136. extern const char *Arealist;        /* List of message areas */
  137. #endif
  138.  
  139. #ifdef MAILFILTER
  140. extern const char *FilterFile;
  141. #endif
  142.  
  143. #ifdef MBFWD
  144. extern const char *Forwardfile;        /* Mail forwarding file */
  145. #endif
  146.  
  147. #ifdef NETROM
  148. extern const char *Netromfile;        /* Netrom node save file */
  149. #endif
  150.  
  151. #ifdef NODECALL
  152. extern const char *NODEHelp;        /* NODE Help file */
  153. extern const char *NODEInfo;        /* NODE Info file */
  154. #endif
  155.  
  156. #if (defined(NNTP) || defined(NNTPS))
  157. extern const char *NNTPdir;        /* News messages and NNTP data */
  158. extern const char *NNTPaccess;
  159. #endif
  160.  
  161. #ifdef NNTPS
  162. extern const char *NNTPactive;
  163. extern const char *NNTPforward;
  164. extern const char *NNTPhistory;
  165. extern const char *NEWS2Mail;
  166. extern const char *NNTPhelp;
  167. extern const char *NNTPinfo;
  168. extern const char *NNTPpointer;
  169. extern const char *NNTPpoll;
  170. #endif
  171.  
  172. #if (defined(POP) || defined(POP2CLIENT) || defined(POP2SERVER) || defined(POP3CLIENT) || defined(POP3SERVER))
  173. extern const char *Popusers;        /* POP user and password file */
  174. #endif
  175.  
  176. #ifdef REJECT
  177. extern const char *REJECTFile;        /* Message rejection file */
  178. #endif
  179.  
  180. #ifdef ROUTESERVER
  181. extern const char *RouteServer;        /* Enabled remote encap routes */
  182. #endif
  183.  
  184. #ifdef STATS
  185. extern const char *STATSDir;        /* Statistics directory */
  186. #endif
  187.  
  188. #ifdef TUTOR
  189. extern const char *Info;        /* Information Center directory */
  190. extern const char *News;        /* News Center directory */
  191. extern const char *Tutor;        /* Tutorial Server directory */
  192. extern const char *UCmdsHelp;        /* BBS CMD help file */
  193. extern const char *UserCmds;        /* BBS CMD directory */
  194. #endif
  195.  
  196. #ifdef USERLOG
  197. extern const char *UDefaults;        /* User preference file */
  198. extern const char *UDefbak;        /* Backup of preference file */
  199. #endif
  200.  
  201. #ifdef WPAGES
  202. extern const char *WhitePages;        /* White Pages user log file */
  203. extern const char *WhitePagesBBS;    /* White Pages BBS log file */
  204. extern const char *WPUpdateFile;    /* White Pages update temp file */
  205. #endif
  206.  
  207.  
  208.  
  209. #ifdef UNIX
  210. /* Session manager defaults */
  211. extern const char *Trace_sessmgr;    /* Session manager for Trace session */
  212. extern const char *Command_sessmgr;    /* Session manager for Command session */
  213. #endif
  214.  
  215. extern const char *rootdir;
  216.  
  217.  
  218. void assign_filenames (const char *config,int verbose);
  219. void initroot (char *root);
  220. long userlogin (const char *name,char *pass,char **path,int len,int *pwdignore);
  221. void rootdircat (char const **filename);
  222. char *userlookup (const char *username,char **password,char **directory,
  223.             long *permission,uint32 *ip_address);
  224. int permcheck (char *path,long perms,int op,char *file);
  225. void list_filenames (int create);
  226.  
  227. #endif    /* _FILES_H */
  228.  
  229.